<template>
  <div class="spotlight pages">
    <Top></Top>
    <Nav></Nav>
    <div class="info-list" v-loading="noticeLoading">
      <div class="back-home">
        <BackHome></BackHome>
      </div>
      <div class="top">
        <div class="title">{{ noticeList.title }}</div>
        <div class="small-title">发布日期: {{ noticeList.create_time }}</div>
      </div>
<!--      <div class="string"></div>-->
      <div class="bottom">
        <div class="text" v-html="noticeList.content" style="text-indent: 2em"></div>
<!--        <img :src="noticeList.face_url" alt="" v-if="noticeList.face_url!=''">-->
<!--        <div v-else="noticeList.face_url==''"></div>-->
      </div>
    </div>
  </div>
</template>

<script>
import Top from '@/components/Top.vue'
import Nav from '@/components/Nav.vue'
import Bottom from '@/components/Bottom.vue'
import BackHome from '@/components/BackHome.vue'
import {getNoticeDetailApi} from "@/api/spotlight";
export default {
  name: "spotlight-detail",
  data(){
    return{
      fairActive: 1,
      noticeLoading:false,
      noticeList: {
        create_time:'',
        category_text:''
      },
    }
  },
  methods:{
    getListDetail() {
      this.noticeLoading = true
      const id = this.id
      getNoticeDetailApi(id).then((res) => {
        if(res.status === 200){
          this.noticeList = res.result[0];
        }
      }).finally(()=>{
        this.noticeLoading = false
      })
    },
  },
  components:{
    Top,
    Nav,
    Bottom,
    BackHome
  },
  mounted() {
    this.utils.createParams(this, this.$route.query);
    this.getListDetail()

  }
}
</script>

<style scoped lang="scss">
.spotlight{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  .info-list{
    width: 1100px;
    margin-bottom: 80px;
    min-height: 600px;
    .back-home{
      position: fixed;
      right: 0;
    }
    .string{
      width: 100%;
      height: 1px;
      background-color: #E8E8E8;
      margin: 20px 0;
    }
    .top{
      width: 1100px;
     // height: 200px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      box-sizing: border-box;
      margin-top: 30px;
      .title{
        color: #CD1738;
        font-size: 28px;
      }
      .small-title{
        margin-top: 20px;
        color: #8f8a8a;
        font-size: 14px;
        margin-bottom: 25px;
      }
    }
    .bottom{
      display: flex;
      //justify-content: center;
      width: 1100px;
      flex-direction: column;
      border: 1px solid #E8E8E8;
      padding: 15px;
      .text{
        //margin: 30px auto;
        font-size: 15px;
        margin: 30px 0;
      }
      img{
        width: 600px;
        margin: 30px auto;
      }
    }
  }

}
</style>


